<%@page import="com.legendshop.oa.constants.SysParameterEnum"%>
<%@page import="com.legendshop.oa.util.PropertiesUtil"%>
<%@page import="com.legendshop.oa.security.UserManager"%>
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/pages/common/taglib.jsp"%>
<c:set var="adminMessageDtoList"  value="${indexApi:getMessage()}"></c:set>
<header class="am-topbar admin-header">
  <div class="am-topbar-brand"  style="width:260px;">
    <strong><a id="backendLogo" href="${contextPath}/admin/index" data-type="index"><%=PropertiesUtil.getObject(SysParameterEnum.SITE_NAME, String.class) %></a> </strong>
  </div>
  <button class="am-topbar-btn am-topbar-toggle am-btn am-btn-sm am-btn-success am-show-sm-only" data-am-collapse="{target: '#topbar-collapse'}"><span class="am-sr-only">导航切换</span> <span class="am-icon-bars"></span></button>
  <div class="am-collapse am-topbar-collapse" id="topbar-collapse">
    <ul class="am-nav am-nav-pills am-topbar-nav am-topbar-left admin-header-list">
    <c:forEach items="${sessionScope.MENU_LIST}"  var="menu" varStatus="status">
     	<li><a href="${contextPath}${menu.action}"  action="${menu.menuAction}"  data-type="top"  <c:if test="${currentMenu.menuId eq menu.menuId}">class="am-topbar-nav-a"</c:if>
     	<c:if test="${currentMenu.menuId==0 &&status.index==0 }">class="am-topbar-nav-a"</c:if> >${menu.name}</a></li>
    </c:forEach>
    </ul>
    <ul class="am-nav am-nav-pills am-topbar-nav am-topbar-right admin-header-list">
         <li><a href="${contextPath}/admin/index"><span class="am-icon-home"></span> 首页</a>
       </li>
       <%--  
      <li><a href="javascript:;" id="shopIndex"><span class="am-icon-envelope-o"></span> 消息箱 <span class="am-badge am-badge-warning">${adminMessageDtoList.totalMessage}</span></a>
                  <ul class="am-dropdown-content" id="message">
               <c:forEach items="${adminMessageDtoList.list}"  var="adminMessageDto" varStatus="status">
               <c:if test="${status.index < 4 && adminMessageDto.num > 0}">
               <li><a href="${contextPath}${adminMessageDto.url}"><span class=""></span>${adminMessageDto.name}<font size="3" color="red"> ${adminMessageDto.num}</font> 条</a></li>
               </c:if>
               <c:if test="${status.index >= 4 && adminMessageDto.num > 0}">
               <li style="display:none"><a href="${contextPath}${adminMessageDto.url}"><span class=""></span>${adminMessageDto.name}<font size="3" color="red"> ${adminMessageDto.num}</font> 条</a></li>
               </c:if>
               </c:forEach>
               <li id="check_more" style="display:block"><a href="#" onclick="checkmore()"><span class=""></span>查看更多......</li>
               <li id="slip" style="display:none"><a href="#" onclick="slip()"><span class=""></span><font color="#ff0000">收起</font></li>
	        </ul>
      </li>
       
--%>

      <li  id="myProfile" name="myProfile" >
        <div class="am-dropdown" data-am-dropdown style="margin-top:15px;">
           <a class="am-dropdown-toggle" data-am-dropdown-toggle href="javascript:void(0);">
              <span class="am-icon-user"></span>  您好: <b>
				<%=UserManager.getUser(session).getRealName() %>
			</b>&nbsp;<span class="am-icon-caret-down"></span>
           </a>
	        <ul class="am-dropdown-content"  >

	          <li><a href="${contextPath}/admin/myland/query"><span class="am-icon-user"></span> 资料</a></li>

	          <li><a href="javascript:changeAdminPwdDialog(this)"><span class="am-icon-cog"></span> 修改密码</a></li>
	        </ul>
        </div>
      </li>
      <li><a href="${contextPath}/admin/logout"><span class="am-icon-power-off"></span> 退出</a></li>
      <!-- 
      <li class="am-hide-sm-only"><a href="javascript:;" id="admin-fullscreen"><span class="am-icon-arrows-alt"></span> <span class="admin-fullText">开启全屏</span></a></li>
       -->
    </ul>
  </div>
</header>
<script language="JavaScript" type="text/javascript">
$('#shopIndex').mouseover(function () {
	$('#message').show();
});
$('#message').mouseover(function () {
	$('#message').show();
});
$('#message').mouseout(function () {
	$('#message').hide();
});

function checkmore(){
	$('#message li').each(function(index){
		$(this).show();
	});
	$('#check_more').hide();
}

function slip(){
	$('#message li').each(function(index){
		if(index>=4){
		$(this).hide();
		}
	});
	$('#check_more').show();
}
</script>